<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="with=device-with,user-scalable=no,initial-scale=1"/>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <title>Lab212 在线学习平台</title>
    <#include "../common/res.html">
</head>
<body>
<#include "../common/header.html">
<div class="f-main">
    <div class="types-block clearfix" style="text-align: center">
        <h3 class="types-title">登录</h3>
        <form action="${s.base}/auth/doLogin.html" class="oc-form" method="post" id="infoForm"
              style="text-align: center;border: 1px solid #CCC;width: 600px;margin:0 auto;padding:20px;">
            <li><label>用户名</label>
                <input name="username" value="" type="text" class="input-text" placeholder="请输入用户名"/>
            </li>
            <li>
                <label>密码</label>
                <input id="password" name="password" type="password" placeholder="请输入密码" class="input-text"
                       autocomplete="off">
            </li>
            <li>
                <label>验证码</label>
                <input id="identityCode" name="identityCode" type="text" maxlength="6" class="input-text"
                       placeholder="请输入验证码" style="width: 150px">
                <a class="vali-base"><img onclick="reloadIdentityImg();" id="identityImg"
                                          src="${s.base}/tools/identity/code.html"
                                          style="width: 80px;height: 40px;float: left;margin-left: 10px"/> </a>
            </li>
            <li>
                <label style="background-color: #eee"></label>
                <input type="checkbox" value="1" id="checkbox1" name="rememberMe"
                       style="float:left;vertical-align: middle">
                <span class="text" style="float: left;margin-left: 5px;margin-top: -10px">下次自动登录</span>
            </li>
            <#if errcode && errcode==1>
            <li style="text-align: left">
                <span style="color: red;">请输入正确的验证码</span>
            </li>
            </#if>
            <#if errcode &&errcode==2>
            <li style="text-align: left">
                <span style="color: red;">用户名或密码错误</span>
            </li>
            </#if>
            <li>
                <input type="submit" value="登录" style="margin-right:20px;width:100px;">
            </li>
        </form>
    </div>
</div>
<#include "../commons/footer.html">
</body>
    <script type="text/javascript">
        function reloadIdentityImg() {
            document.getElementById("identityImg").src=CONTEXT_PATH+"tools/identity/code.html?ticket="+Math.random();
        }
    </script>
</html>